<?php 

	/**
	*	定义人类
	*/
	class Person
	{
		//成员属性
		public $name;
		public $age;
		public $height;

		//成员方法
		/**
		*	说话的方法
		*/
		public function talk()
		{
			return $this->name;
		}

		/**
		*	走路的方法
		*/
		public function walk($someone)
		{
			return $someone.'正在走路中....';
		}

		/**
		*	测试方法
		*/
		public function test($someone)
		{
			return $this->walk($someone);
		}

		/**
		*	自我介绍的方法
		*/
		public function intro()
		{
			echo '我叫'.$this->name.',今年'.$this->age.',身高'.$this->height.'的我至今没有女朋友';
		}
	}

	//实例化对象
	$nan = new Person;
	$nan->name = '王颖楠';
	$nan->age = 20;
	$nan->height = '170cm';

	//echo $nan->talk();

	//var_dump($nan);

	$fang = new Person;
	$fang ->name = '鲁芳芳';
	$fang->age = 20;
	$fang->height = '168cm';

	//echo $fang->talk();

	//echo $fang->name;

	// echo $nan->test('颖楠');

	// echo $fang->test('芳芳');

	$nan -> intro();





